|
hmm thats strange for some reason my post didn't come out as I wrote it - the xml example that I give should be like this <myroot>...
|
|
|
|
|
Try this:
1. drag and drop a textbox ctrl, a button and a Datetime picker.
2. run the application and press tab . u can see the focus in each control including DTpicker.
3. Just select another date in the dattime picker using that combo.
4. now press tab , u will see that DTPicker doesnt receive the focus....
help me if u can brin the focus ....
regards, Mani
|
|
|
|
|
hi,
i would like to know how an application developed in VB.NET can access ip packets. ie the fields in ip packets. and manipulate the ip packets.
|
|
|
|
|
The .NET Framework doesn't have any classes that will allow you to do this natively. You'll need a device driver that will do the "dirty" work for you and it must expose an API that you can P/Invoke using VB.NET to get the information you need.
You can pick up the book "Network Programming in .NET" for a complete discussion and examples. Or you can search the web for "Packet sniffing .NET" and piece the information together yourself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In .net, I am reading in a text file, line by line. Each line represents the file path for a picture I'd like to show. What I am trying to do is change the picture each time a user clicks the button.
For example, lets say I've got something like this:
Private Sub Form2_Load
If Button1.Click = 1 Then
PictureBox1.Visible = True
PictureBox1.Image = System.Drawing.Image.FromFile _
(string1(y))
End If
I know I can't do button1.click like this, but is there another way?
Basically, I want the if condition to check if the button has been clicked or not.
Thanks for any help or direction,
Mike
|
|
|
|
|
There is no "if" condition to check to see if the button was clicked. You simply put the code in the Click event handler of the button. Go to the form designer window and double-click on the button you want to add the code to. The code editor will come up with a blank event handler function for that button. All you need to do is add the code:
PictureBox1.Visible = True
PictureBox1.Image = System.Drawing.Image.FromFile _
(string1(y))
You'll also need some code in here to increment the value of y and check to see that it doesn't exceed the bounds of the array string1() .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the feedback Dave. However, my application is a little bit different. In the main program, I am using streamreader to read in a text file line by line. Each line is a file path to a jpeg picture. In my loop of reading the file, I dont want the streamreader to read the next line until the user presses the button. Somehow I think I need to monitor if the button has been clicked or not within the streamreader loop. Maybe there's an easier way, I dunno.....
-Mike
|
|
|
|
|
You're actually trying to do it the hard way. You can monitor for the click, but you can't do it reliably. Your loop can execute multiple iterations if the user holds the button down for even 1 second.
Since, from your first post, your reading the filepaths into a String array, just read them all in. You really shouldn't be holding open resources like your trying to do. It's very bad practice.
Once you have all the filepaths in the array, you can setup a counter that points to the first index in the String array and you call a function to load and display the image it's pointing to. When the user clicks the button, you increment the counter, check to majke sure it hasn't overflowed, then call the function to load and display the image.
Actually, it'd be easier to write a class to encompass this functionality. But that's an entirely different discussion...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
In Windows datagrid, one of the column is a boolean column, in which, user don't want to see True/False. They want to see Yes/No.
Similar, kind of requirement is when another column is bind with a checkbox. They don;t want checked or unchecked box in the column.
How can I display just Yes or No in Boolean column in types of cases? Please advice. Thanks
Pankaj
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
Where is the source coming from? Change the columns datatype to a string and edit the source to be yes/no depending on its boolean value. Reverse it when saving.
|
|
|
|
|
I'm new to this and am acquiring two channels of voltage data through a DAQ using a windows form application. I have a stripchart showing the progression of the data over time, and would like to print the stripchart object in its entirety. If that means printing the entire window, I can be happy with that.
Any pointers to get me going in the right direction would be much appreciated. If any of you have used SoftWIRE in VS.NET and Measurement Computing boards to do this, please speak up!
Thanks,
Kirk
Update (12:16pm CST):
I've just found the MSDN VB code for printing a form, at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vbcode/html/vbtskCodeExamplePrintingForm.asp[^]
Is there a way to print the contents of the stripchart alone?
|
|
|
|
|
Hello to all
Kindly provide me link to free charting and grid controls to be used along with VB.NET
Leave your mark wherever you go
|
|
|
|
|
Similar posting a week or so ago regarding charting:
Graph Controls[^]
Also have a search through the articles on this site... there's lots and i am sure one or two should be suitable to your needs.
Hope this helps
Tom
|
|
|
|
|
Dear friends!
Does anyone know or even have tried to add "Find" form (like ctrl+F in Excell) in this grid? I would be very thankful for any help!!!
|
|
|
|
|
Is there any way that I can have multipule return Type for a function e.g. Function A can returns both Boolean and String or Integer.
|
|
|
|
|
No, you cannot overload a procedure by only changing it's return type:
Rules of Procedure Overloading - MSDN[^]
However you can pass add additional parameters by reference (ByRef rather than the default ByVal) that are modified within the function and available in the calling code, the Graphics.MeasureString function is overloaded in this way to return the number of lines and characters fitted in addition to the return type of SizeF:
Graphics.MeasureString - MSDN[^]
Hope this helps.
Tom
|
|
|
|
|
How do you set the initial directory to my documents for Windows XP?
thanks
|
|
|
|
|
kenexcelon wrote:
How do you set the initial directory to my documents for Windows XP?
Me.FolderBrowserDialog1.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
Me.FolderBrowserDialog1.ShowDialog()
Hope this helps
Tom
|
|
|
|
|
Thanks a bunch. Worked like a charm.
Me.dlgOpen.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
Can you believe my vb teacher took off 20 points from my Word Processor project just because it didn't open from My Documents intitally. I think that was really steep.
|
|
|
|
|
Hi guys,
i'm a beginner and my question might sound stupid but I have a button on my form and i want it to link to a website, how do i do it?
|
|
|
|
|
Try the following code in your button click event:
System.Diagnostics.Process.Start("http://www.thecompanyname.com")
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi, i'm doing a project and I need to add 0 to the front of a number. Is there a way to format a number?
for example: 898 become 000898
If anyone could help me, I would appriciate.
Thank you.
|
|
|
|
|
viettho wrote:
Hi, i'm doing a project and I need to add 0 to the front of a number. Is there a way to format a number?
for example: 898 become 000898
I assume you have some kind of variable where you store your number. Let's also assume this variable is an Int32 (Integer in Visual Basic). The easiest way is to use the method Int32.ToString(String) [^] and pass an appropriate NumberFormatInfo[^].
Dim myInt As Integer = 898
MessageBox.Show(myInt.ToString("D6"))
Best regards
Dennis
|
|
|
|
|
|