|
Inside the web browser, you have no access to the viewer or the document it's showing. As far as I can find out, you cannot show a specific page.
|
|
|
|
|
hi,
i have one gridview,textbox and button in form
In Db contain Id,Name,Address
when i click the button show all information from db.
its working good.i need sort list the datagrid.
for example i have to enter A in textbox its automatically
sort list A names only(using like query). this also working good.
but already gridview contain 10 records.then added new search result also.
so i need to refresh datagrid n after search text.
thanks in advance
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
You just reset it's datasource to the new data you want to show.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
thanks..
i got solution....
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Try this:
datagridview.Update()
|
|
|
|
|
not working this method..
reset the data set. now perfectly working
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
You might want to read the documentation on what the Update method does.
|
|
|
|
|
Hi,
Can any one help me to get the current user name(RDN) in windows using vb/c#.net
am able to get the user name but i need to get the RDN name
Thanks,
Nanda
|
|
|
|
|
|
I have a wireless device that has a DLL that can be used to control it. I'm trying to utilize VB.Net to control it, but several of the functions in the DLL contain pointers which is proving to be quite the challenge. The following DLL call keeps returning false and I can't figure out why. I have tried changing the values that I pass to the dll from ByRef to ByVal and vice versa as I have found that to work with a few other DLL calls, but not this one. I'm hoping somone can point me in the correct direction.
DLL being called:
BOOL AirpcapWrite ( PAirpcapHandle AdapterHandle,
PCHAR TxPacket,
ULONG PacketLen
)
Transmits a packet.
Parameters:
AdapterHandle Handle to the adapter.
TxPacket Pointer to a buffer that contains the packet to be transmitted.
PacketLen Length of the buffer pointed by the TxPacket argument, in bytes.
Returns:
TRUE on success.
where PAircapHandle is defined as
typedef struct _AirpcapHandle * PAirpcapHandle
The code that I am unable to get to work properly is as follows:
Imports System.Runtime.InteropServices
Public Class Form1
Structure AirpcapDeviceDescription
Dim address As IntPtr
Dim DeviceName As String
Dim DeviceDesciption As String
End Structure
Private Declare Function AirpcapWrite Lib "airpcap.dll" (ByVal AdapterHandle As IntPtr, ByRef TxPacket As String, ByRef PacketLen As Long) As Boolean
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim handle As IntPtr
Dim channel As Long
Dim TxPacket As IntPtr
Dim packetData As String
Dim packetLen As Long
packetData = "FFFFFFFF"
packetLen = Len(packetData)
TxPacket = Marshal.StringToHGlobalAuto(packetData)
'transmit a packet
If AirpcapWrite(handle, packetData, packetLen) = True Then
Debug.Print("succesfully transmitted a packet")
End If
End Sub
End Class
I functioning code where I have been able to obtain the handle.
Thanks for the help!
|
|
|
|
|
Well, BOOL is an int, for a start. A long and a ULONG are not the same thing, you want unsigned long. I think you should check www.pinvoke.net for tips on pinvoke signatures.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hello,
Does anyone know how to convert the KeyCode/KeyValue to an ascii character? I found i could use an api call to do it but I can't call a dll for every keystroke an expect performance...
Problem --> I hit the \ key. Depending on how I try to convert it, i either get "0EM5" or the U with the 2 dots above it. How do i convert the value to ascii 97?
Thanks,
Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Try casting it to an int.
protected override void OnKeyDown(KeyEventArgs e)
{
string str = string.Format("\x202D{0} (0x{1:X4})", e.KeyChar, (int)e.KeyChar);
txtKeyValue.Text = str; <=================== a textbox for visual confirmation, while testing
}
[Edit]
Sorry, that is C#. I forgot I was in VB Forum.
I'll try to translate and get back to you.
[/Edit]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I'll try to do it in VB.Net this time. Be warned I don't use VB very much so there may be the odd error, but I hope to be close enough for you to understand.
Private Sub Panel1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
Dim str As String = String.Format("{0} ({1:X4})", e.KeyCode, CType(e.KeyCode, Int32))
Me.TextBox1.Text = str
End Sub
Hope this helps. I've tested it in VB.Net Express 2005, and it works.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry,
Thanks for the idea. However, I do not get the desired out come. Using the exact line you gave, it outputs 'OEM5' 'DC' it converted the 220 which is the \ to hex instead of the ascii value.
thanks for your effort
nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I am sometimes extremely thick!
In case you have not solved this yet, search MSDN for the Asc Method .
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Private Sub Panel1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
Dim str As String = String.Format("{0} ({1:X4})", e.KeyCode, CType(e.KeyCode, Int32))
Me.TextBox1.Text = str
End Sub
You should get the keycode (220) in the e.KeyCode argument, that is an integer. So you don't need the String.Format stuff
|
|
|
|
|
Hi,
If you can handle the KeyPress event instead of KeyDown you would get access to the KeyPressEvent.KeyChar property. Would that solve your problem?
Alan.
|
|
|
|
|
Alan,
The application we are building requires filtering of allowed keys to be pressed per textbox. so we have numeric only, keys available for ssn, fein, our id, etc. by doing so, we killed the ability to hit ctrl-v, ctrl-c, ctrl-x, shift insert(paste). so our filter is being done in keypress but to allow the copy and paste keys, i need to move the filtering to keydown where i found this issue of not getting the "accurate" ascii value for characters we could be testing for. ex i'm getting 220 when i should be getting 92. now i realize i could be testing for each character via the keys enumerator but my intent was to use Char.IsLetter(), etc.
thanks for you help...
Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I found it.
When i googled, i looked for KeyEventArgs for a way to do it. Turns our in the keypress event even though 'e' doesn't expose anything regarding the shift/contrl/alt etc, you can test for them anyway.
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If (Control.ModifierKeys And Keys.Control) = Keys.Control Then
MsgBox("Pressed " + Keys.Control.ToString())
ElseIf (Control.ModifierKeys And Keys.Shift) = Keys.Shift Then
MsgBox("Pressed " + Keys.Shift.ToString())
End If
End Sub
Thanks everyone
Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
In VB6 I was able to check the query unload event and test why the form was closing. I wanted to do this to prevent the checkbox in the upper right of the screen from being used to close the form.
in the form_closing event, I would check to see if the UnloadMode = vbFormControlMenu
It appears this will not work in .net, is there an alternative way I should look at (I want to leave the box on the form, sorry)
M
|
|
|
|
|
The way I do it, is to keep a boolean variable that is initially set to False. When the user closes the screen using the button I want them to use, I set it to true in the Button_Click event before calling the close or exit statement. Then in the Form_Closing event I cancel the close if the boolean is not True.
There might be another way...perhaps looking at the sender parm?
|
|
|
|
|
Ahhhh... very clever, I like it.
Thanks
|
|
|
|
|
If you hook into the FormClosing event, there's a FormClosingEventArgs parameter which has a CloseReason property. The CloseReason property is a value from the CloseReason enumeration; if the user closes the application this property will be CloseReason.UserClosing
Alternatively, you could override WndProc; check which message gets sent when you click the close button
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
dim str1 as string
dim str2 as string
dim str3 as string
I have a string "Name1 Name2 Name3" and want to do this
str1=Name1
str2=Name2
str3=Name3
how make this?
|
|
|
|