|
Create a ProcessStartInfo object and configure it with the executable name, any command line parameters, etc. Then start the process using a Process object.
Dim si As New ProcessStartInfo
'COnfigure si properties to define process to run
Dim p As Process = Process.Start(si)
|
|
|
|
|
Hello all i am in need for someone to plase point out to me why my drop down list do not rebind after the first databind,
Page loads fine, click on ddlA every thing loads fine in eaither ddlB or ddlc, it's when i reclick or try to set some ~.visiable= false THEN
Can someone please tell me where i am going work or send me a url so that i can read up on this issue..
Thank you,
Ahead of time,
.............code........................................
Option Strict On
Public Class Wood_Blind_Extras_Main
Inherits System.Web.UI.UserControl
Dim IDA_TapCor As Int32
Dim IDProduct As Int32
Dim IDA_Remote As Int32
'
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'
hdnProductID.Value = Request.QueryString("IDProduct")
hdnIDA_TapCor.Value = Request.QueryString("IDA_TapCor")
hdnIDA_Remote.Value = Request.QueryString("IDA_Remote")
'
ddlClothTapeColors.Visible = False
ddlBlindRemote.Visible = False
If Page.IsPostBack Then
If ddlClothTapeColors.Visible = True Then
ddlBlindRemote.Visible = False
Else
ddlBlindRemote.Visible = True
ddlClothTapeColors.Visible = False
End If
End If
End Sub
'...
Private Sub ddlMainOptions_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlMainOptions.SelectedIndexChanged
'
'...
Try
'
Select Case ddlMainOptions.SelectedItem.Value
'
Case "ClothTape"
ddlMainOptions.SelectedItem.Value = hdnIDA_TapCor.Value
IDA_TapCor = CInt(ddlMainOptions.SelectedItem.Value)
ddlClothTapeColors.Visible = True
GetTapeColors()
Case "Remote"
ddlMainOptions.SelectedItem.Value = hdnIDA_Remote.Value
IDA_Remote = CInt(ddlMainOptions.SelectedItem.Value)
ddlBlindRemote.Visible = True
GetRemote()
Case "Motorization"
ddlMainOptions.SelectedItem.Value = ""
Case "Routless"
ddlMainOptions.SelectedItem.Value = ""
Case "Extras"
Case Else
End Select
'
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
'
Private Sub GetTapeColors() ' ClothTape colors for Wood and Alternitive Blinds
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim ClothTapeColors As New ConstructionSuperCenter.BCom_NS.Wood_and_Alternitive_Blinds_MAIN
'Get Fabric Colors For DDL
ddlClothTapeColors.DataSource = ClothTapeColors.Get_Standard_Blind_Cloth_Tape_Colors_(IDProduct, IDA_TapCor)
ddlClothTapeColors.ToolTip = "Please Choose a Cloth Color"
ddlClothTapeColors.DataTextField = "AttributeName"
ddlClothTapeColors.DataValueField = "AttributeName"
ddlClothTapeColors.DataBind()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
'
Private Sub GetRemote() 'Get Lets the consumer know if there is a remote for this product
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim BlindRemote As New ConstructionSuperCenter.BCom_NS.Wood_and_Alternitive_Blinds_MAIN
'Get blind remote option for DDL
ddlBlindRemote.DataSource = BlindRemote.Get_Standard_Blind_Remote_(IDProduct, IDA_Remote)
ddlBlindRemote.ToolTip = "Remote Option"
ddlBlindRemote.DataTextField = "AttributeName"
ddlBlindRemote.DataValueField = "AttributeName"
ddlBlindRemote.DataBind()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
'
End Class
...........................html..............................................
<asp:dropdownlist id="ddlMainOptions" autopostback="True" runat="server">
<asp:listitem value="Extras">-- Extras --
<asp:listitem value="ClothTape">Cloth Tape
<asp:listitem value="Remote">-- Remote --
<asp:listitem value="Motorization">-- Motorization --
<asp:listitem value="Routless ">-- Routless --
| <asp:placeholder id="phExtras" runat="server"> | <asp:dropdownlist id="ddlClothTapeColors" autopostback="True" runat="server" height="40px"><asp:dropdownlist id="ddlBlindRemote" runat="server" autopostback="True"> | <asp:datalist id="dlFabricTape" runat="server" height="168px" width="8px">
<itemtemplate>
<selecteditemtemplate>
| | |
|
|
|
|
|
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'
hdnProductID.Value = Request.QueryString("IDProduct")
hdnIDA_TapCor.Value = Request.QueryString("IDA_TapCor")
hdnIDA_Remote.Value = Request.QueryString("IDA_Remote")
'
ddlClothTapeColors.Visible = False
ddlBlindRemote.Visible = False
If Page.IsPostBack Then
If ddlClothTapeColors.Visible = True Then
ddlBlindRemote.Visible = False
Else
ddlBlindRemote.Visible = True
ddlClothTapeColors.Visible = False
End If
End If
End Sub
For starters ->
If ddlClothTapeColors.Visible = True Then - can't happen, you just set it to false
So, ddlBlindRemote will ALWAYS be visible.
I suspect that when something is invisible, it's not rendered, which means your view state is lost as well.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi guys.
Just a question, what command do I use to make my VB.net program to extract a value from the windows registry as well as to input something new into the windows registry? Thanz for your time...
|
|
|
|
|
I think this [^] can help you. It's C# (basically the same).
<italic>Work hard, Work effectively.
|
|
|
|
|
|
U didn't look carefully. Try this[^].
<italic>Work hard, Work effectively.
|
|
|
|
|
@(o.o)@
Dang, that is deep... Will try to figure it out now... thanz man... Appreciate u helping me out by giving those links...
|
|
|
|
|
Tried the link u gave me... it doesn't recognise the registrykey part..
|
|
|
|
|
icowa wrote:
it doesn't recognise the registrykey part
What doesn't recognise the registrykey part?
<italic>Work hard, Work effectively.
|
|
|
|
|
my VB.net in Visual Studio .net 2003. it doesn't seem to recognise the registrykey command because it would put wavy blue lines under it..
|
|
|
|
|
Imports Microsoft.VisualBasic
Imports System
Imports System.Security.Permissions
Imports Microsoft.Win32
<italic>Work hard, Work effectively.
|
|
|
|
|
Are there any ways to convert all the items in a listbox into one string?
E.G. A,B,C are items in a listbox. I need to create a string (A B C) according to the listbox.
|
|
|
|
|
Iterate through the item lists and concatenate the string.
<italic>Work hard, Work effectively.
|
|
|
|
|
Any chance of explaining that a bit further? I don't understand
|
|
|
|
|
Not sure, how to code it in VB. Try this.
String temp
temp=""
For Each item In ListBox1.Items
temp=temp+ item.Text
Next item
<italic>Work hard, Work effectively.
|
|
|
|
|
Dim tempString As String = String.Empty
Dim item As String
For Each item In ListBox1.Items
tempString &= item
Next
Or
Dim tempStrings As String() = Array.CreateInstance(GetType(String), ListBox1.Items.Count)
ListBox1.Items.CopyTo(tempStrings, 0)
Dim resultString As String = String.Join(", ", tempStrings)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can anyone help me???
how to send file (eg powerpoint slide, flash, video etc) from server to client in .net remoting in vb.net.
Thank you!!!
|
|
|
|
|
Remoting is not the best method for sending files. A better choice would be something dedicated to the task, such as FTP, BITS, or your own custom written implementation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a calendar that comes up over a combo box(which is how I want it), but the combo box shows through the middle of the calendar? Probably an easy fix I'm sure.
|
|
|
|
|
hi,
in control panel > internet connections > connections > lan settings > proxy
i can define what should go through proxy i choose, then i can write what will bypass it...
is there a way to define only one port/remote ip request that will go through the proxy and all other will bypass it ?
thx.
|
|
|
|
|
If I understand your question correctly, no, there isn't. The proxy settings in IE only work down to the IP address/hostname, not the port level.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
how can i capture keys pressed on keyboard without having focus on program form ?
is there an event for it ? i can only capture keys on form..
i use VB6, anyone can help ?
thx.
|
|
|
|
|
You have to use a global hook
'app.hInstance is this module '0 = all threads to it's global.
HookPtr = SetWindowsHookEx(WH_KEYBOARD_LL, AddressOf LowLevelKeyboardProc, App.hInstance, 0&)
Your LowLevelKeyBoardProcedure has to grab the raw data and then decode it.
Public Function LowLevelKeyboardProc(ByVal nCode As Long, ByVal WParam As Long, ByVal LParam As Long) As Long
Private Type KBDLLHOOKSTRUCT
vkCode As Long 'a virtual-key code in the range 1
'to 254
scanCode As Long 'hardware scan code for the key
Flags As Long 'specifies the extended-key flag,
'event-injected flag, context code,
'and transition-state flag
time As Long 'time stamp for this message
dwExtraInfo As Long 'extra info associated with the
'message
End Type
Dim KeyInfo As KBDLLHOOKSTRUCT
Call CopyMemory(KeyInfo, ByVal LParam, Len(KeyInfo))
'Now can grab the raw key code
KeyInfo.vkCode
Keep in mind there is an up key event and down key event. You want to do most of your processing on only on the down key event since that will allow you to grab CTL + Key or ALT + Key or Shift + Key combinations.
|
|
|
|
|
hi guys!
need urgent help
i m facing very strange problem
i m loading Crystal report using ado.net datasets
fist i create datasets and then in the form i use the following code:
Dim rpt As New WAnalysisReport 'The report I created.
Dim myDS As New AnalysisDst 'The DataSet I created.
==============================================
'all objects are declared
myDS.Clear()
Try
myConnection = New SqlConnection("Data source=localhost;initial catalog=complaint;uid=sa;password=;)
MyCommand.Connection = myConnection
MyCommand.CommandText = "SELECT c.*,a.* from complaint_detail as c,actiontaken as a where c.complaint_id=a.complaint_id order by a.complaint_id"
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand
myDA.Fill(myDS, "complaint_detail")
myDA.Fill(myDS, "actiontaken")
rpt.SetDataSource(myDS)
'crystalreportviewer1.
CrystalReportViewer1.ReportSource = + "c:\\Program Files\WAnalysisReport.rpt"
CrystalReportViewer1.ReportSource = rpt
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
===========================================================
this code works fine in my app. but gives a database login prompt in another application and didn't load the report.
i have checked the connection string .it is correct.
can any one tell me how to overcome that Data base login window.
bi
abhinav
|
|
|
|