|
Member 10279246 wrote: external exe in a frame in vb.net WinForms does not have a "frame" concept. You can change the parent of a running executable to point to your Window, as you already did. SetWindowLong[^] is used to change the border. The statusbar and toolbars aren't part of that border. The borderstyles can be found on P/Invoke[^].
..and please don't repost the exact same question. People tend to ignore duplicate posts.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Which part of "don't repost" did you not understand?
You have now posted the same question twice in this forum, and twice in QA. You haven't even had the courtesy to respond to the people who have tried to answer your previous versions of this question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
No you can't.
You can, however, open and run an external program from VB.Net.
|
|
|
|
|
Actually, you can do that. It's not very nice looking and you don't have control over the application window nor with the application itself. The user can do whatever they want with application, including putting it back to windowed mode and moving it around inside your parent window, even to the point where they can't see the window any more.
|
|
|
|
|
I want to run ms word application in my program... I have call the exe but I want to run under a frame means I do not want to show the border..
or any method to remove the frame or border of external exe
here is sample code which I got but not working
-----------------------------------------
Public Class Form1
Inherits System.Windows.Forms.Form
Declare Function ShowWindow Lib "user32" (ByVal hWnd As System.IntPtr, ByVal nCmdShow As Integer) As Boolean
Private Const SW_MINIMIZE As Integer = 6
Private Const SW_MAXIMIZE As Integer = 3
Private Const SW_RESTORE As Integer = 9
Declare Function SetParent Lib "user32" (ByVal hWndChild As System.IntPtr, ByVal hWndNewParent As System.IntPtr) As System.IntPtr
#Region " Windows Form Designer generated code "
Private Sub wordMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wordMenu.Click
Dim pinfo As New ProcessStartInfo("WINWORD")
Dim p As Process = System.Diagnostics.Process.Start(pinfo)
p.WaitForInputIdle()
SetParent(p.MainWindowHandle, Label1.Handle)
End Sub
End Class
'Here this fellow explain how to run winword under a label.. But it is not working.... or any method to remove frame of called exe
|
|
|
|
|
Member 10279246 wrote: Here this fellow explain how to run winword under a label.. But it is not working. Then you should go and ask him for help.
Veni, vidi, abiit domum
|
|
|
|
|
Kindly don't repost - I saw the same question in Q&A.
You won't be able to remove the border of the external exe unless you have their source code and can pass a parameter that suggests you are launching this program from another location.
|
|
|
|
|
i have made a table
plotno int Not Null
plotsize varchar(10) Allow Null
block varchar(5) Allow Null
sqyards numeric(5, 0) Allow Null
rate numeric(18, 0) Allow Null
plot_total_rate numeric(18, 0) Allow Null
Book_amt numeric(18, 0) Allow Null
date datetime Allow Null
referance varchar(50) Allow Null
status varchar(15) Allow Null
,i made a form plotmaster in visual basic related to the respected table field, the referance feild has combo box property where the refarance name will automatically add from agent master, which occcurs already successfully at the time of form load of plot master.i used a goup box where three radio button appear, 1-booked,2-hold,3-fresh, when user click on the respected radio button the same radiobutton text like(booked, hod, refresh) will store in status field.
here is the coding.
Imports System.Data.SqlClient
Public Class frmplot
Dim cnn As New SqlConnection("Data Source=toshiba-pc;Initial Catalog=VRINDAVAN;User ID=sa;password=zion123")
Dim cmd As New SqlCommand
Dim dr As SqlDataReader
Dim da As SqlDataAdapter
Dim ds As New DataSet
Dim stable As DataTable
Dim sbuilder As SqlCommandBuilder
Private Sub frmplot_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
comboload()
txtplno.Focus()
dgvstatus2.[ReadOnly] = True
txtdt.Text = (Format(Now, "short date"))
cnn.Close()
End Sub
Private Sub comboload()
cnn.Open()
Dim strSQL As String = "SELECT * FROM agentmaster"
Dim da As New SqlDataAdapter(strSQL, cnn)
Dim ds As New DataSet
da.Fill(ds, "agentmaster")
With cmbref
.DataSource = ds.Tables("agentmaster")
.DisplayMember = "aname"
.ValueMember = "acode"
.SelectedIndex = 0
cnn.Close()
End With
End Sub
Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click
dgvstatus2.[ReadOnly] = True
If txtplno.Text = "" Then
MsgBox("Please Enter Plot No.", MsgBoxStyle.OkOnly, "Plot Master")
txtplno.Focus()
ElseIf txtpsize.Text = "" Then
MsgBox("Please Enter Size of Plot", MsgBoxStyle.OkOnly, "Plot Master")
txtpsize.Focus()
ElseIf txtblock.Text = "" Then
MsgBox("You must Enter Block", MsgBoxStyle.OkOnly, "Agent Master")
txtblock.Focus()
ElseIf txtsyard.Text = "" Then
MsgBox("You must Enter Square Yard.", MsgBoxStyle.OkOnly, "Agent Master")
txtsyard.Focus()
ElseIf txtrate.Text = "" Then
MsgBox("You must Enter Rate.", MsgBoxStyle.OkOnly, "Agent Master")
txtrate.Focus()
ElseIf txtbamt.Text = "" Then
MsgBox("You must Enter Boking Amount", MsgBoxStyle.OkOnly, "Agent Master")
txtbamt.Focus()
Else
insert()
End If
End Sub
Private Sub insert()
txttpr.ReadOnly = True
Dim status As New GroupBox
Dim R, S As String
R = ""
If (cmbref.SelectedIndex > -1) Then
R = cmbref.Text.ToString
End If
With status
If rbuttonbook.Checked = True Then
S = rbuttonbook.Text
ElseIf rbuttonhld.Checked = True Then
S = rbuttonhld.Text
Else
S = "None"
End If
End With
cnn.Open()
cmd.CommandText = "insert into plotmaster (plotno,plotsize,block,sqyards,rate,plot_total_rate,Book_amt,date,referance,status) values ('" & txtplno.Text & "','" & txtpsize.Text & "','" & txtblock.Text & "','" & txtsyard.Text & "','" & txtrate.Text & "','" & txttpr.Text & "','" & txtbamt.Text & "',#" & txtdt.Text & "#,'" & R & "','" & S & "')"
cmd.ExecuteNonQuery()
cnn.Close()
MessageBox.Show("Data Saved Successfully", "Party Master")
txtplno.Text = ""
txtpsize.Text = ""
txtblock.Text = ""
txtsyard.Text = ""
txtrate.Text = ""
cmbref.ResetText()
txttpr.Text = ""
txtbamt.Text = ""
txtplno.Focus()
loadgrid()
End Sub
Private Sub loadgrid()
Dim sql As String = "select * from plotmaster"
Dim DataTab As New DataTable
cnn.Open()
cmd = New SqlCommand(sql, cnn)
da = New SqlDataAdapter(cmd)
sbuilder = New SqlCommandBuilder(da)
ds = New DataSet()
da.Fill(ds, "plotmaster")
stable = ds.Tables("plotmaster")
cnn.Close()
dgvstatus2.DataSource = ds.Tables("plotmaster")
'Dgvstatus1.ReadOnly = True
'Dgvstatus1.SelectionMode = DataGridViewSelectionMode.FullRowSelect
dgvstatus2.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells
End Sub
Private Sub rbuttonhld_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbuttonhld.CheckedChanged
Dim S As String
If rbuttonhld.Checked = True Then
S = rbuttonhld.Text
Else
S = "None"
End If
End Sub
Private Sub rbuttonbook_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbuttonhld.Click
End Sub
Private Sub cmbref_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbref.SelectedIndexChanged
Dim R As String
R = ""
If (cmbref.SelectedIndex > -1) Then
R = cmbref.SelectedItem.ToString
End If
End Sub
Private Sub rbuttonhld_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbuttonhld.Click
End Sub
Private Sub rbuttonfresh_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbuttonfresh.CheckedChanged
Dim S As String
If rbuttonfresh.Checked = True Then
S = rbuttonfresh.Text
Else
S = "None"
End If
End Sub
Private Sub rbuttonfresh_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbuttonfresh.Click
End Sub
Private Sub txtrate_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtrate.LostFocus
Dim ra, t, sq As Integer
ra = Val(txtrate.Text)
sq = Val(txtsyard.Text)
t = ra * sq
txttpr.Text = t
End Sub
Private Sub rbuttonbook_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbuttonbook.CheckedChanged
Dim S As String
If rbuttonbook.Checked = True Then
S = rbuttonbook.Text
Else
S = "None"
End If
End Sub
End Class
when i run the program the eror comes :--ExecuteNonQuery: Connection property has not been initialized.
where is the problem , the same syntex of insert i am using in agent master it's working,
pls do needfull and send me the solution urgently,
regard's
Anand
|
|
|
|
|
Member 10192835 wrote: pls do needfull and send me the solution urgently, It's not urgent. We're volunteers, and reply in our own spare time. I can even choose not to reply.
You should assign the connection cnn to the Connection property of the SqlCommand. As is, it doesn't know on which connection to execute your nonquery.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I am having trouble getting InstallShield to install to use with Visual Studio / Visual Basic 2012.
I have downloaded InstallShield 2012 Spring LimitedEdition. The installation completed without errors. When I try start InstallShield, I get a warning dialog that states: Invalid License data. Reinstall is required.
I have reinstalled twice, but I always get the same warning. There was NEVER any opportunity to enter the serial number that Flexera Software provided.
I posted a similar query of the Flexera InstallShield forum. I also sent an email to Flexera support. Sadly, over a week and there has no response from either.
Does anyone here have any suggestions what I might try next?
|
|
|
|
|
Member 10265228 wrote: I posted a similar query of the Flexera InstallShield forum. I also sent an email to Flexera support. Sadly, over a week and there has no response from either. Go to the competition.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Why bother to make such an unhelpful comment.
Never got any help from this forum anyway.
Deleting from my favorites. Consider me gone.
|
|
|
|
|
Well it is a valid suggestion, normally we would send you to their forums for such a specific problem but as you have already exhausted that avenue the suggestion to use a different product is valid. So it was not Eddy being a smart ass it is you being overly sensitive.
And he is right it is only urgent to you, the rest of us are enjoying the weekend (I hope).
[edit] oops wrong thread [/edit]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Member 10265228 wrote: Why bother to make such an unhelpful comment. "Unhelpful" is an opinion; IMHO it'd be the only rational and logical move. One would not want to be depending on a vendor that does not deliver as promised.
Member 10265228 wrote: Never got any help from this forum anyway. Yeah, that'll be the forums fault then?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
WOW! Considering we have TRIED to help you, I find your comment extremely offensive.
I seem to remember you had a case-sensitivity problem with a dBase database...
|
|
|
|
|
Hello,
I need to communicate between two exes. Scenario is as following:
- an application in installed on various machines in a network.
- This app will pull the data from sql server database and display to the user. The user is allowed to make modifications to that data.
- When any another user is watching the same screen on a different machine in the network I would like to refresh that screen automatically.
I do not have much knowledge on communication between exes, this is what I thought as solution:
- update db table with IP address whenever user navigates to that form, and remove the entry when he is out of it.
- update log table in db whenever data is changed on that particular form.
- Write a service on the DB server that reads this and sends messages to all the machines on the network that has this app opened and the form on display
-once the app gets the message from service the form will refresh.
Does this solution makes sense, can anybody guide me please. Though I thought of this solution I am not sure how I should communicate from service to exe.
Thanks in Anticipation.
Srinivas
|
|
|
|
|
MLSrinivas wrote: Does this solution makes sense.
No, you would be better off creating a flag table in the database that is updated when the table changes, all the other clients could then poll the that table at a set interval and update if the flag has changed.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Good suggestion - the simple solutions always tend to be the ones that work best
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Every now and then I'm executing a macro in Excel/VBA, and I get an error message box with nothing but three digits, "400". No link to help, no source, no description, nothing but "400". What is this error?
|
|
|
|
|
Found this[^]
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
Experts,
Kind of a simple/oddball question...
I'm using VS2012, but making entities, and need to represent the IP Address and Netmask, among other things, for a router. Just a simple class that has all the basic router info, is all.
System.Net.IPAddress is great for the IP Address (really?), and I already have access to all kinds of netmask/CIDR conversion, etc., but the real issue is how to use, represent/convert/display a netmask.
So you typically talk about an ip in a line of *-config on a Cisco router like this:
ip address 75.150.122.161 255.255.255.240
But how would I store this in a class with properties, etc.?
One thought was to store BOTH the IP Address and netmask as IP Addresses...
What are your thoughts?
TIA!
pat
|
|
|
|
|
You could just store it as an integer (Int32), an IP address and netmask are nothing more than 4 bytes printed out in a formatted manner. Its easier for people to view them as dotted notation, but in a computer they are just a 32 bit int. If you want to add properties, you could create your own structure and add the methods you want.
|
|
|
|
|
Hello, I am doing this project where I need to perform Image Shading Correction in Visual Basic ? I am thinking of using a very strong Low Pass Filter for this purpose , can anyone tell me how can I design the filter using Visual Basic because I have never worked on it before.
Thanks
Arsalan
|
|
|
|
|
Hi,
I have 2 tables and from those two I created two different XML files and merge them into one.
My code is...
Try
OpenConnection()
Dim sb As New StringBuilder
With sb
.Append("SELECT * FROM salesdetails WHERE InvoiceId='" & TbInvNo.Text & "'")
End With
Dim dbcommand As New MySqlCommand
Dim dbadapter As New MySqlDataAdapter
Dim stdata As New DataSet()
dbcommand.Connection = conn
dbcommand.CommandText = sb.ToString
dbadapter.SelectCommand = dbcommand
dbadapter.Fill(stdata, "salesdetails")
stdata.WriteXml(Application.StartupPath & "\ReportXml\SaleXml.xml", XmlWriteMode.WriteSchema)
Dim dbread As MySqlDataReader = dbcommand.ExecuteReader
While dbread.Read
IID = dbread("InvoiceId")
End While
dbread.Close()
Dim sb2 As New StringBuilder
With sb2
.Append("SELECT * FROM salesitems WHERE InvoiceId='" & TbInvNo.Text & "'")
End With
Dim dcmd As New MySqlCommand
Dim sadapter As New MySqlDataAdapter
Dim sd As New DataSet()
dcmd.Connection = conn
dcmd.CommandText = sb2.ToString
sadapter.SelectCommand = dcmd
sadapter.Fill(sd, "salesitems")
sd.WriteXml(Application.StartupPath & "\ReportXml\SalesItems.xml", XmlWriteMode.WriteSchema)
Dim Table1 As New XmlTextReader(Application.StartupPath & "\ReportXml\SaleXml.xml")
Dim Table2 As New XmlTextReader(Application.StartupPath & "\ReportXml\SalesItems.xml")
Dim XmlDataSet1 As New DataSet
Try
XmlDataSet1.ReadXml(Table1)
Dim XmlDataSet2 As New DataSet
XmlDataSet2.ReadXml(Table2)
XmlDataSet1.Merge(XmlDataSet2)
XmlDataSet1.WriteXml(Application.StartupPath & "\ReportXml\CompleteSales.xml", XmlWriteMode.WriteSchema)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error!!!")
End Try
Dim objRpt As New SaleBill
objRpt.SetDataSource(XmlDataSet1.Tables())
FormReport.RptViewer.ReportSource = objRpt
FormReport.ShowDialog()
FormReport.RptViewer.RefreshReport()
Catch ex As Exception
MsgBox(ex.Message)
Finally
CloseConnection()
End Try
I created the Datasource of the crystalreport file from the XML file and designed it.
But the problem is when I tried to generate the report, It shows only the SalesItems table data whereas the other table data are also present in the XML file BUT NOT SHOWING .
What should I do ?
I am using CrystalReport 13 with VB.NET 2010.
modified 3-Oct-13 16:37pm.
|
|
|
|
|