My error is:
Error 4 The call is ambiguous between the following methods or properties: 'Grub2._0.Time.InitializeComponent()' and
'Grub2._0.Time.InitializeComponent()'
Here is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
namespace Grub2._0
{
public partial class Time2 : PhoneApplicationPage
{
public void Time2.()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
if (AMRadioButton.IsChecked == true)
NavigationService.Navigate(new Uri("/PolicemanFood.xaml", UriKind.Relative));
else if (PMRadioButton.IsChecked == false)
NavigationService.Navigate(new Uri("/Weed.xaml", UriKind.Relative));
else
NavigationService.Navigate(new Uri("/BurgerKing.xaml", UriKind.Relative));
}
}
}
I met this proplem when I put 2 wpf projects in one solution which shares some libs, and then open the 2 at the same time. Seems the 2 visual studio instance want generate code for the 2 exe at the same time, which causes conflicts.
Closing one of them solves the problem.
Try this code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
namespace Grub2._0
{
public partial class Time2 : PhoneApplicationPage
{
public Time2()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
if (AMRadioButton.IsChecked == true)
NavigationService.Navigate(new Uri("/PolicemanFood.xaml", UriKind.Relative));
else if (PMRadioButton.IsChecked == false)
NavigationService.Navigate(new Uri("/Weed.xaml", UriKind.Relative));
else
NavigationService.Navigate(new Uri("/BurgerKing.xaml", UriKind.Relative));
}
}
}
Removed the void keyword and period after Time2 on the constructor.
Related
So today I tried dll injection to game (assult cube) to test my experience with my job.
But I got problems with Win32 Exception: 0xc0000005.
My code looks like:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Memory;
namespace AssultCube_Cheat
{
public partial class Form1 : Form
{
Mem assultcube = new Mem();
public static string RifleAmmo = "ac_client.exe+0x0017E0A8";
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
int PID = assultcube.GetProcIdFromName("ac_client");
if (PID > 0)
{
assultcube.OpenProcess(PID);
Thread WA = new Thread(writeAmmo) { IsBackground = true };
WA.Start();
}
}
private void writeAmmo()
{
while (true)
{
if (checkBox1.Checked)
{
assultcube.WriteMemory(RifleAmmo, "int", "80");
Thread.Sleep(2);
}
Thread.Sleep(2);
}
}
}
}
I tried updating my computer drivers, upgrading my system to Windows 11 but problem didnt fix.
I'm sorry, I speak a little English.
The button3_Click is work, but the Form1_Resize it does not work.
using System;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Globalization;
namespace FirstApp
{
public partial class Form1 : Form
{
private void button3_Click(object sender, EventArgs e)
{
this.Hide();
notifyIcon1.Visible = true;
}
private void Form1_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.Hide();
notifyIcon1.Visible = true;
}
}
}
}
Why? What is the problem?
I'm beginner in C#, sorry.
Here is my code: I am trying to find the roblox PlayerBeta but its not working
I am not the best in coding but I found out how to find it but cant implent it right into the code
( EDIT ) The program works if I use the PID but that changes everytime I open up a new RobloxPlayerBeta ! so I cannot use that
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Memory;
using System.Diagnostics;
namespace ForceField
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Mem MemLib = new Mem();
private void button1_Click(object sender, EventArgs e)
{
if (System.Diagnostics.Process.GetProcesses().Any((p) => p.ProcessName.Contains("RobloxPlayerBeta")))
{
int robloxPid = System.Diagnostics.Process.GetProcessesByName("RobloxPlayerBeta").FirstOrDefault().Id;
}
Console.WriteLine(robloxPid);
MemLib.writeMemory("0x184C3A98", "string", "PlsNoBan ");
Console.WriteLine(MemLib.readString("0x184C3A98"));
}
}
}
Omg I am stupid.. xD
I needed to do MemLib.OpenGameProcess(robloxPid)
So basically.. I added 2 new pages in a frame and when I press a button it changes frame..
But if I check a checkbox on the first page it wont be checked if I go to another page and then go back to the first one..
here is a more visual look http://recordit.co/Py3zptKLck
Source code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace CheckboxesAndPages
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
main.Content = new SecondPage();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
main.Content = new thirdPage();
}
}
}
There is no source code for the 2 pages.
You are giving it a new SecondPage every time
SecondPage secondPage = new SecondPage();
private void button_Click(object sender, RoutedEventArgs e)
{
main.Content = secondPage;
}
Windows Phone 8 App
In my MainPage.xaml I have the following:
<Image HorizontalAlignment="Left" Height="215" VerticalAlignment="Top" Width="450" Margin="10,299,-40,0" Source="/Assets/Images/MTCOB.jpg"/>
What I want is for the user to tap this and then a website open in IE8.
In my MainPage.xmal.cs I have the following:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using GamesWithGold.Resources;
using Microsoft.Phone.Tasks;
using System.Windows.Interop;
namespace GamesWithGold
{
public partial class MainPage : PhoneApplicationPage
{
public MainPage()
{
InitializeComponent();
}
private void Image_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
}
}
}
.............
I am new to this so would really like some help getting my first app out in BETA.
Try this:
private void Image_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
WebBrowserTask BrowserTask = new WebBrowserTask();
BrowserTask.Uri = new Uri("http://www.google.com",UriKind.Absolute);
BrowserTask.Show();
}