|
LOL, best post ever! But I will do this for you, it will cost you 550 British Pounds per day!
|
|
|
|
|
No one here will do your job for you. what company is going to be happy that you disclosed their entire application in it's source for others to look at?? You're exposing the entire business logic that people paid you to create????
|
|
|
|
|
hai friends,
I'm new to vb.net. i've Datagridcomboboxcolumn in my project. i want open the form at run time when i press F2 key on Datagridcomboboxcolumn then only form should appear . but Datagridcomboboxcolumn has no events to keydown,it has only disposed events for it. how can i raise the keydown events. anyone help to me.
Advance Thanks,
A.Gomathinayagam
|
|
|
|
|
Please don't post the same thread again
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
hai friends,
I'm new to vb.net, I've Datagridcomboboxcolumn in my project. i want open the form at run time when i press F2 key on Datagridcomboboxcolumn,then only it should appear. but Datagridcomboboxcolumn has no events for keydown,it has only disposed events. how can i raise the keydown events for Datagridcomboboxcolumn. anyone help to me.
Advance Thanks,
A.Gomathi nayagam
|
|
|
|
|
Maybe use the KeyDown event of the grid and then determine the current cell.
|
|
|
|
|
See Liqz reply.
Depending on the use of the form you want to load, you might want to reconsider the use of F2. If your form is for editing the content of the column, fair enough, but if that is not the case, consider a different key if possible. F2 is the standard key to use when editing the contents of a DataGridView cell.
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.”
|
|
|
|
|
how to check whether the given data in the textbox control is valid , if valid the relevant details should be displayed?? can any one tell coding for this?? am doing this in vb.net using asp.net, a project which is a part of my course?? can any one help me... and am giving you the coding part... below, can anyone help me please...
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %>
<script runat="server">
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If (TextBox1.Text <> "") Then
Panel1.Visible = True
Panel2.Visible = True
Else
Panel1.Visible = False
Panel2.Visible = False
End If
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
End Sub
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<center>
<table>
<tr>
<td colspan="2">
<asp:Label ID="Label2" runat="server" Height="4px" Text="Patient Details" Width="139px" Font-Bold="True" Font-Size="Larger"></asp:Label></td>
</tr>
<tr>
<td style="width: 114px">
<asp:Label ID="Label1" runat="server" Text="Patient Id"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="TextBox1" runat="server" Height="15px" Width="57px"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="Button2" runat="server" Text="Display" OnClick="Button2_Click" /></td>
</tr>
<tr><td style="width: 114px"><asp:Panel ID="Panel1" Visible="false" runat="server" Height="176px" Width="185px" HorizontalAlign="Left" BorderColor="Cyan" >
Panel1<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<tr><td>
<asp:Label ID="Label3" runat="server" Text="Report Incident" Width="117px"></asp:Label></td>
<tr><td><asp:DropDownList ID="drop1" runat="server" Height="6px" Width="54px">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:DropDownList></td><br /><br /><br />
<center>
<asp:Button ID="Button1" runat="server" Text="Enter to Report" PostBackUrl="~/Rep Entry Screen.aspx" OnClick="Button1_Click" /> </center>
</asp:Panel>
</td>
<td style="width: 100px">
<asp:Panel ID="Panel2" Visible="false" runat="server" Height="176px" Width="185px" HorizontalAlign="Left" BorderColor="Cyan" >
<center>
Displayed Report Entry Scren</center><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><center>
</center></asp:Panel>
</td>
</tr>
</table>
</center>
</asp:Content>
|
|
|
|
|
You need to look into javascript.
The following link goes to a tutorial that will teach you how to do this:
http://www.w3schools.com/js/js_form_validation.asp[^]
The same website has a lot more tutorials and information that will come in handy when you .are developing web pages and web applications
P.S. Post your other questions concerning web development on the ASP.NET forum.
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
when u select any cell in tablelayoutpanel i need to show selection Handlers around the cell ..But it's not dispalaying correct way..
Public Class Form8
Const Handle_Size As Integer = 6
Dim iwidth As Integer
Dim iHeigt As Integer
Dim ileft As Integer
Dim itop As Integer
Private Sub TaleLayoutPanel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TableLayoutPanel1.MouseDown
Dim widths As Integer() = TableLayoutPanel1.GetColumnWidths()
Dim heights As Integer() = TableLayoutPanel1.GetRowHeights()
Dim col As Integer = -1
Dim left As Integer = e.X
For i As Integer = 0 To widths.Length - 1
If left < widths(i) Then
col = i
iwidth = widths(i)
Exit For
Else
left -= widths(i)
End If
ileft += widths(i)
Next
Dim row As Integer = -1
Dim top As Integer = e.Y
For i As Integer = 0 To heights.Length - 1
If top < heights(i) Then
row = i
iHeigt = heights(i)
Exit For
Else
top -= heights(i)
End If
itop += heights(i)
Next
DrawControlBorder(sender)
End Sub
Private Sub DrawControlBorder(ByVal sender As Object)
Dim control As Control = DirectCast(sender, Control)
Dim Border As New Rectangle(New Point(control.Location.X + ileft - Handle_Size / 2, control.Location.Y + itop - Handle_Size / 2), New Size(iwidth + Handle_Size, iHeigt + Handle_Size))
Dim NW As New Rectangle(New Point(control.Location.X + ileft - Handle_Size, control.Location.Y + itop - Handle_Size), New Size(Handle_Size, Handle_Size))
Dim N As New Rectangle(New Point(control.Location.X + ileft + iwidth / 2 - Handle_Size / 2, control.Location.Y + itop - Handle_Size), New Size(Handle_Size, Handle_Size))
Dim NE As New Rectangle(New Point(control.Location.X + ileft + iwidth, control.Location.Y + itop - Handle_Size), New Size(Handle_Size, Handle_Size))
Dim W As New Rectangle(New Point(control.Location.X + ileft - Handle_Size, control.Location.Y + itop + iHeigt / 2 - Handle_Size / 2), New Size(Handle_Size, Handle_Size))
Dim E As New Rectangle(New Point(control.Location.X + ileft + iwidth, control.Location.Y + itop + iHeigt / 2 - Handle_Size / 2), New Size(Handle_Size, Handle_Size))
Dim SW As New Rectangle(New Point(control.Location.X + ileft - Handle_Size, control.Location.Y + itop + iHeigt), New Size(Handle_Size, Handle_Size))
Dim S As New Rectangle(New Point(control.Location.X + ileft + iwidth / 2 - Handle_Size / 2, control.Location.Y + itop + iHeigt), New Size(Handle_Size, Handle_Size))
Dim SE As New Rectangle(New Point(control.Location.X + +ileft + iwidth, control.Location.Y + itop + iHeigt), New Size(Handle_Size, Handle_Size))
Dim g As Graphics = Me.CreateGraphics()
' ControlPaint.DrawBorder(g, Border, Color.Gray, ButtonBorderStyle.Dotted)
ControlPaint.DrawGrabHandle(g, NW, True, True)
ControlPaint.DrawGrabHandle(g, N, True, True)
ControlPaint.DrawGrabHandle(g, NE, True, True)
ControlPaint.DrawGrabHandle(g, W, True, True)
ControlPaint.DrawGrabHandle(g, E, True, True)
ControlPaint.DrawGrabHandle(g, SW, True, True)
ControlPaint.DrawGrabHandle(g, S, True, True)
ControlPaint.DrawGrabHandle(g, SE, True, True)
g.Dispose()
End Sub
End Class
|
|
|
|
|
Your question is not answerable. How are we supposed to know what you define as the "correct way" since you didn't provide any information on what you expect this code to do??
And cells in a TableLayoutPanel are not selectable at runtime, so I have no idea what you're trying to do with this...
|
|
|
|
|
Tried to balance the 1 you got there, a horrid question indeed.
|
|
|
|
|
Has anyone else noticed that we're being overrun by the Nation of Idiocracy?
I hate that people just drive-by and 1 vote, or the OP 1-votes the response because it didn't come with a completely coded solution they could copy-n-paste.
|
|
|
|
|
It's been running rampant lately, in all forums. The worst is in the SB, you can get hammered there. I'm learning slowly to not get baited into posting in there. But yeah, give a reply the OP doesn't like (example, how can I make my application unterminatable by even the TaskManager = NO) you get 1 voted. It's quite annoying.
|
|
|
|
|
Hi All,
I have this function to retrieve the version from a vb.net manifest file that is giving me fits. I swear that it worked when I went to bed late, late, last night but when I got up this morning it would return nothing. It has to be something simple that I am overlooking, but for the life of me I can't see it and am starting to cuss Microsoft and their *&$#^# XML ^#%(($ reader piece of &^^#@**$ bla, bla, bla. So, if anybody can pull my fat out of the fire it would be appreciated. Here is the stoned stupid, bone simple, 3rd grade routine that I think outta work.
Private Function GetManifestVer(ByVal strManifestFile As String) As String
GetManifestVer = ""
Dim xmlr As XmlTextReader
xmlr = New XmlTextReader(strManifestFile)
While Not xmlr.EOF
xmlr.Read()
If xmlr.Name = "entryPoint" Then
If xmlr.IsStartElement Then
GetManifestVer = xmlr.GetAttribute("version")
Exit While
End If
End If
End While
xmlr.Close()
End Function
You can pass any vb.net manifest to it. I am using the [application].exe.manifest file created by a compile. I sure any manifest file will do for testing. So help me out before I start beating this computer like a red headed stepchild. Thanks - Stu
|
|
|
|
|
I tried this adapted version of your code:
Private Function GetManifestVer(ByVal strManifestFile As String) As String
Try
GetManifestVer = ""
Dim xmlr As XmlTextReader
xmlr = New XmlTextReader(strManifestFile)
While Not xmlr.EOF
xmlr.Read()
If xmlr.Name = "entryPoint" Then
If xmlr.IsStartElement Then
GetManifestVer = xmlr.GetAttribute("version")
Exit While
Else
GetManifestVer = "StartElement not found"
End If
Else
GetManifestVer = "entryPoint not found"
End If
End While
xmlr.Close()
Catch ex As Exception
Return ex.Message
End Try
End Function
It does not find "entryPoint". Can there be a simple syntax error, or maybe it is case sensitive or something ?
My advice is free, and you may get what you paid for.
|
|
|
|
|
Thanks for taking a look. Both my code and yours finds the 'entryPoint' element on my box but neither can find the 'version' attribute. Actually my code did work and then quit at some point. Go figure, makes me think that the Microsoft implementation of the XML reader is not ready for prime time. But as soon as I think that I am sure to get slapped in the face by an error that was my doing, that is usually the case. I would like to do it with XML, but it is costing to much time. I seem to be doing what all of the other examples on the web are doing. I guess it is back to the old fashion parse. Did you actually try it on your box? With a .exe.manifest file created from a build?
|
|
|
|
|
I am not entirely sure what it is you need to do, as I myself have never needed to access manifest files (in fact I never even looked at one until your post), so I just found one and ran it against your code.
All I got was "entryPoint not found"
My advice is free, and you may get what you paid for.
|
|
|
|
|
I am just trying to get the version value from a manifest file that was created by a build/compile. The file can be found in any applications \bin\Release\ServiceInvoice.exe.manifest folder. I am writing my own Application updater. I want my apps to be under easily accessible under the 'program files' directory so click-once publish is not an option. I have written a small routine that downloads the manifest from my \bin\Release folder (which is a virtual dir under my IIS) and then extracts the version via the routine (GetManifestVer) that we are discussing. compares it with its own version and makes a decision to download the 'exe' or not. Enclosed is the code, it is very raw and once working I will stick in more parameters and error trapping before it is done. But it will go something like this .
Private Sub UpdateApp()
Dim MVer As String = ""
Dim AVer() As String = Split(My.Application.Info.Version.ToString, ".", True)
Dim AName As String = My.Application.Info.AssemblyName
Dim LocalPath As String = My.Application.Info.DirectoryPath
Dim LocalApp As String = LocalPath & "\" & AName & ".exe"
Dim RemoteApp As String = "http://Stu-Laptop/IMS/" & AName & "/" & AName & ".exe"
Dim RemoteManifestFile As String = "http://Stu-Laptop/IMS/" & AName & "/" & AName & ".exe.manifest"
Dim LocalManifestFile As String = My.Application.Info.DirectoryPath & "\Manifest.xml"
Dim xmlr As XmlTextReader
Dim WebConnection As New WebClient()
Dim CurV() As String
Try
If File.Exists(LocalManifestFile) Then File.Delete(LocalManifestFile)
WebConnection.DownloadFile(RemoteManifestFile, LocalManifestFile)
Catch ex As Exception
MsgBox("Error retrieving web file", ex.Message)
Exit Sub
End Try
xmlr = New XmlTextReader(LocalManifestFile)
While Not xmlr.EOF
xmlr.Read()
If xmlr.Name = "entryPoint" Then
If xmlr.IsStartElement Then
MVer = xmlr.GetAttribute("version")
Exit While
End If
End If
End While
xmlr.Close()
If File.Exists(LocalManifestFile) Then File.Delete(LocalManifestFile)
If MVer = "" Then Exit Sub
CurV = Split(MVer, ".", True)
If (AVer(0) < CurV(0)) Or (AVer(1) < CurV(1)) Or (AVer(2) < CurV(2)) Or (AVer(3) < CurV(3)) Then
FileCopy(LocalApp, LocalPath & "\" & AName & ".old")
WebConnection.DownloadFile(RemoteApp, LocalApp)
System.Diagnostics.Process.Start(LocalApp)
End If
End Sub
Thanks again for your continued interest. Stu
|
|
|
|
|
I just opened up a few of these manifest files (with PSPad) and they all look something like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Neither the ones made with VS 2003 nor the ones made with VS 2008 had any mention of a tag or attribute called "entryPoint", they do however all have the tag "assemblyIdentity" with a "version" attribute.
Is it possible that the manifest file you used (late the day-before-yesterday) is/was for some reason different from the average manifest file ?
As the problem seems to be that the element "entryPoint" is simply not found, perhaps you should try to open your manifest with some editor, and see if there isn't some other element you could check for?
My advice is free, and you may get what you paid for.
|
|
|
|
|
Yes my manifests seen a little more complicated. But I am glad to inform you that I have resolved the issue. Like usual it was me. When you work very late into the night strange things happen, specially when there is a full moon. I usually quit when the computer gives a loud beep in response to some error & it scares me out of my chair mumbling something like 'What the *)%(&^^ was that?'. below is a piece of my manifest.
<asmv1:assembly manifestversion="1.0" xsi:schemalocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyidentity version="1.0.0.19" name="ServiceInvoice.exe" publickeytoken="0000000000000000" language="neutral" processorarchitecture="msil" type="win32">
<application>
<entrypoint>
<assemblyidentity name="ServiceInvoice" version="1.0.41220.731" publickeytoken="D1E735326A597357" language="neutral" processorarchitecture="msil">
<commandline file="ServiceInvoice.exe" parameters="">
<trustinfo> <security>
<applicationrequestminimum>
<permissionset unrestricted="true" id="Custom" samesite="site">
<defaultassemblyrequest permissionsetreference="Custom">
Its a pretty long manifest - would take 2 to 3 pages to print out. The correct node to search for is assemblyIdentity not entry point. Both my raw code and your error trapped code works correctly when given the right value. I have finished my routines and it works like a dream, a seamless, silent, transparent check of the version & then download if necessary of a new exe and kick off. User never sees a thing. It reverts back to the old exe if it fails at any point. Its nice now, all I have to do is compile, nothing else is required, I don't have to make any files set any flags etc.
I do have another issue though. It seems like I got myself into some kind of debug/Edit purgatory where I can't edit in the debug mode. It started when I put some values in the debug properties window for testing my command line functions. I get cute little padlocks on my code page tab and a error that says 'Changes are not allowed when the debugger has been attached to an already running process or the code being debugged has been optimized at build or run time' a search of the net and trying other peoples workarounds have not resolved it and its really starting to piss me off. Oh well, being of German heritage, I am stubborn and as tenacious as a rabid pit bull and sure that I will figure it out even if I have to trash & rebuild the project (none of my other apps are doing it). If you are familiar with this particular animal, then drop me a line.
Thanks again for all of the time you have spent and interest shown. You are the first guy that has ever responded to an issue that I have posted (I don't post often) and it is appreciated.
|
|
|
|
|
It seems that I need quotes around the XML. Let me try that again.
"'<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity version="1.0.0.19" name="ServiceInvoice.exe" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<application />
<entryPoint>
<assemblyIdentity name="ServiceInvoice" version="1.0.41220.731" publicKeyToken="D1E735326A597357" language="neutral" processorArchitecture="msil" />
<commandLine file="ServiceInvoice.exe" parameters="" />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>'"
|
|
|
|
|
You should also considering laying off the late night coding parties, and get yourself some good old fashion sex, drugs and rock 'n roll... and if you feel you must, some sleep.
My advice is free, and you may get what you paid for.
|
|
|
|
|
You got that right, but unfortunately those days are gone, over here in the US, unemployment is running rampant. The programming field has been decimated by outsourcing. H1 Visa's get what jobs are left. The government has declared war on the citizens, stealing everything we got & giving it away to their cronies who will give some of it back to them by way of speaker fees, campaign contributions, and graft of all sorts. Our Constitution has been totally trashed by an imaginary war on terror as if we didn't know who is really behind it. Sex?, Drugs?, Rock & Roll?, Sleep? All of those things a dim memory of days long gone. Hope things are better where your at. Enjoy it while you can. The New World Order is comming....
Thanks again for your support Stu.
"Truth is treason in the Empire of Lies."
|
|
|
|
|
Can any one tell me how to make delegates in multithreading
for grid view or a control having parameters in its property
Best Of regards,
Mirza Rahman
|
|
|
|
|