|
|
I am new to VB.net but have a need to send secure data from my web site to another web site and then they will return data to me. What is the best way to handle this ?
Thanks
|
|
|
|
|
You could start with the HttpWebRequest and HttpWebResponse classes in System.Net; these allow you to interact directly with a site via HTTP.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
|
in VB how can we can get the code of the .exe file generated if we loose the source file??
|
|
|
|
|
|
Can someone help me how can I set my transparent form so I can click through it. if there is an icon behind my form (on Desktop for example), and I click, so the icon clicked....
OmarMallat
|
|
|
|
|
If it got it right, you have to do this:
public const int HTTRANSPARENT = -1;
public const int WM_NCHITTEST = 0x84;
protected override void WndProc(ref Message m){
if (m.Msg == WM_NCHITTEST){
m.Result = new IntPtr(HTTRANSPARENT );
}
else {
base.WndProc(m);
}
} I do something like this in a sort of custom ToolTip class.
EDIT: kut wrong forum
Public Const WM_NCHITTEST As Integer = 132
Public Const HTTRANSPARENT As Integer = -1
Protected Overrides Sub WndProc(ByRef m as Message)
If (m.Msg = WM_NCHITTEST)
m.Result = New IntPtr(HTTRANSPARENT )
Else
MyBase.WndProc(m)
End If
End Sub
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
-- modified at 16:51 Saturday 29th October, 2005
|
|
|
|
|
Thanks, but I need a VB.NET Code.. if it's possible.
OmarMallat
|
|
|
|
|
Just modified it
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Sorry, but I'm too poor in C++ or C#.
OmarMallat
|
|
|
|
|
I already edited my first post...
Seems to me you missed it.
[Marc] wrote:
EDIT: kut wrong forum
Public Const WM_NCHITTEST As Integer = 132
Public Const HTTRANSPARENT As Integer = -1
Protected Overrides Sub WndProc(ByRef m as Message)
If (m.Msg = WM_NCHITTEST)
m.Result = New IntPtr(HTTRANSPARENT )
Else
MyBase.WndProc(m)
End If
End Sub
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
-- modified at 17:03 Saturday 29th October, 2005
|
|
|
|
|
Thank you very very much, but can you complete your help and let me know how to use it. should this sub handle anythings??? when this sub was called???
sorry for your time....
and thanks again
OmarMallat
|
|
|
|
|
The WndProc sub has to do with the unmanaged Windows world. The Control class (from wich Label, Form etc are derived) is actually a kind of wrapper around the windows from Windows (now you know why it's called Windows ). When something happens to such a window, WndProc gets the message. Then, according to the message, it calls the right Method.
For example, if you press the left mouse button on a Label, WndProc gets some messages. First the WM_NCHITTEST message (WM is for Window Message). that asks what kind of surface is below the mouse. HTTRANSPARENT means 'Just click right trough me'. HTCLIENT means something like 'Give me (= the control/window) more mouse messages', and then WndProc gets those, for example WM_LBUTTONDOWN. When Control.WndProc gets the WM_LBUTTONDOWN notification, it calls the OnMouseDown method, and that method raises the MouseDown event.
Public Class ClickThroughForm
Inherits Form
Private Const WM_NCHITTEST As Integer = 132
Private Const HTTRANSPARENT As Integer = -1
Protected Overrides Sub WndProc(ByRef m as Message)
If (m.Msg = WM_NCHITTEST) 'If Windows asks what kind of surface the mouse is on
m.Result = New IntPtr(HTTRANSPARENT) 'Return that the mouse should go right through me
Else
MyBase.WndProc(m) 'Windows wants something else, let the base Control class do the work
End If
End Sub
End Class
Maybe i'll write an article about this
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
I used it.
it stop click on the form, but it didn't click through it.
OmarMallat
|
|
|
|
|
That's weird, over here it works fine. Anyhoo, i got it from this article[^]. In the article, the code is in C#. But you can download a demo plus source code in C# and Vb.net.
In that demo, there's a button with 'Visit our sponsor' on it. When the mouse hivers over it, a FloatControl pops up. When the mouse leaves the area of the button (under the FloatControl) the FloatControl goes away. So to me it seems that the mouse events go right trough the FloatControl. Is that about the same effect as you want?
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
-- modified at 19:12 Saturday 29th October, 2005
|
|
|
|
|
Private Const WM_NCHITTEST As Integer = 132<br />
Private Const HTTRANSPARENT As Integer = -1<br />
Protected Overrides Sub WndProc(ByRef m as Message) <br />
If m.Msg = WM_NCHITTEST THEN 'If Windows asks what kind of surface the mouse is on <br />
m.Result = New IntPtr(HTTRANSPARENT) 'Return that the mouse should go right through me Else <br />
MyBase.WndProc(m) 'Windows wants something else, let the base Control class do the work <br />
End If<br />
End Sub<br />
End Class
|
|
|
|
|
Hello!
I am trying to create a UserControl which is inherited by Forms.Panel control
I have declared a variable for PictureBox as a class field
Friend WithEvents pb As PictureBox = New PictureBox()
After the InitializeComponent call in the default constructor, I have added the following code
pb.Visible = True
pb.Location = New Point(0, 0)
pb.Size = Me.Size
pb.BackColor = Color.Black
pb.SizeMode = PictureBoxSizeMode.StretchImage
Me.Controls.Add(pb)
Me.AutoScroll = True
I know that the PictureBox and Panel Control do not raise KeyUp,KeyDown, KeyPress events
Is there any way I can process KeyDown, KeyUp messages in this control?
Actually I want to process the KeyDown event for drawing a Rectangle then moving and resizing it using arrow keys over the picture box.
After the user finishes setting the rectangle, the user will press the Enter Key and the Image in the picture Box will be cropped according to the rectangle.
I have tried override the OnKeyDown but it doesn't invoke.
Thanking you in advance
|
|
|
|
|
Your control needs to have the keyboard focus in order to get the event.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you for the reply
I have solved my problem by inheriting the ContainerControl instead of Panel.
(I hope it is good approach)
Thank You
|
|
|
|
|
hi!
(in Vb.net)I made a package that I take it from Crystall Report , and i install in it to the other PC . whenever i take a report , i recieve this Error :
con not find keycodev2.dll or invalid keycode
plz, help me!
thanks in advance!
yours!
mostafa hosseiny b.
|
|
|
|
|
hello guys:
i need help in mschartcontrol in vb6. actually i need help abt the plotting of the graph.i can feed values in the graph by declaring a 2D array and then using the chartdata property.
the problem is that the i have declared column count =1 and by right clicking the graph in the property window i have defined the series color RED.but when i plot the graph it plots in green color.
the second thing is that of the scaling of the y axis. i wish that the yaxis should show me the values up to 100. but when the program is executed it dislays the scaling according to the values given in the array.
can any body help me in this regard.
thanks.
|
|
|
|
|
Yeah, the mschart is pretty under documented. Take a look at the below sample code of mine. It should be a good starting point for you. It shows you how to setup a graph and how to turn auto-scaling off so that you can set your own axis min/max. The below code assumes your mschart.ocx control is named "chtGraph".
(I wrote this code without the IDE and in a hurry, but based on existing working code, so I hope it still compiles. )
<br />
Private Sub BuildGraph()<br />
Dim vData() As Variant<br />
Dim iMaxPoints As Integer<br />
Dim iIndexData As Integer<br />
<br />
' Activate error trapping.<br />
On Error GoTo catch<br />
<br />
' Do not init max to zero. Graph requires at least one point in<br />
' order to draw, otherwise control is drawn blank.<br />
iMaxPoints = 100<br />
<br />
' Setup data array to be added to graph.<br />
' Array is defined like this: vData(X,Y) where...<br />
' X is max number of points out of all plots.<br />
' Y is the number of axes your plot uses. 2 for 1 plot, 4 for 2 plots, etc.<br />
ReDim vData(0 To (iMaxPoints - 1), 0 To 1)<br />
For iIndexData = 1 To iMaxPoints Step 1<br />
vData(iIndexData - 1, 0) = CDbl(Rnd() * iMaxPoints)<br />
vData(iIndexData - 1, 1) = CDbl(iIndexData)<br />
Next<br />
chtGraph.RowCount = iMaxPoints<br />
chtGraph.ColumnCount = 2<br />
chtGraph.ChartData = vData<br />
<br />
' Setup legend.<br />
chtGraph.ShowLegend = True<br />
chtGraph.Plot.SeriesCollection(1).LegendText = "Plot Line 1"<br />
<br />
' Setup axes.<br />
With chtGraph.Plot<br />
.UniformAxis = False<br />
With .Axis(VtChAxisIdY).ValueScale<br />
.Auto = False ' Turn auto-scaling off.<br />
.MajorDivision = 4<br />
.Minimum = 0<br />
.Maximum = 100<br />
End With<br />
.Axis(VtChAxisIdX).ValueScale.Auto = True<br />
.Axis(VtChAxisIdX).AxisTitle.Text = "X-Axis Title"<br />
.Axis(VtChAxisIdY).AxisTitle.Text = "Y-Axis Title"<br />
End With<br />
<br />
' Draw graph.<br />
chtGraph.Refresh<br />
Exit Sub<br />
<br />
catch:<br />
' Error occurred! Display error message.<br />
MsgBox "Error building graph!", vbCritical, "Internal Error!"<br />
End Sub<br />
|
|
|
|
|
hi,
I want to put a icon near the all the nodes of a treeview control.
The nodes , the nodes are creating at runtime from Oracle.
also how can i put one textbox near those nodes.
Paritosh
|
|
|
|
|
paritosha wrote: I want to put a icon near the all the nodes of a treeview control.
Did you take a look at the ImageIndex[^] property of System.Windows.Forms.TreeNode ?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|