|
To be hones, for now all I can tell you is that you can't do what you are tried to do here.
To be able to advise you you must tell what are you want to do...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Great!
The purpose of my work is to automate the drawing of my telecommunication network. In my disposal: a datase sotirng my network desciption. The idea is to read from this database and draw the network map insigth a visio sheet. Next, i will be working on how to dynamically update the map
I hope it's clear!
Thanks
|
|
|
|
|
It's clear...
However it does not change my previous observation. To do so you need the Visio interop (or Visio itslef ot VSTO) where you will run your application.
Running Vision in a VM does not do that for you...
If the users of you application used to run applications via VM it can be a very good option to add one more in such way. Write your application on a development machine with Visio, than install on the Hyper-V and publish it to the users...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
WRONG!
Visio is NOT installed on your machine. It's installed in a virtual machine image thats running on your machine. You have to treat that like its a remote machine, not locally installed. Your running a virtual machine on your system, not Visio!
|
|
|
|
|
When you asked exactly the same question[^] last week, you got the same answer, and decided that you would have to install Visio on each computer.
You must have had a particularly exciting weekend if you'd managed to forget that in seven days!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Nah - he was just hoping that reality had changed for the new week...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
There has been a weekend in between, stranger things have happened.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I use sql loader sqlldr to read from csv files and insert into DB. Bad file which is often a text file contains reject records. My question is how to convert this text file into excel file or is there any option to output bad file as an excel file in the slqldr command. My records are in unicode format which is also a challenge for me. hope to get your advices. thks
|
|
|
|
|
There is a very verbose explanation of using the OpenXML libraries to build Excel documents at Creating basic Excel workbook with Open XML[^].
That should help with either pre-conversion or error handling scenarios.
The Unicode can be handled by the Text.UnicodeEncoding class. The Microsoft reference is UnicodeEncoding Class[^].
|
|
|
|
|
Connect to MySQL using MySQL Connector.NET and SharpSsh
Hi,
I am trying to connect to MySQL using the MySQL Connector.NET and SharpSsh but getting Unable to connect to MySQL although my SSH was successfully connected.
Can anyone help please...
Here is my code:
private void btnExecSSH_Click(object sender, EventArgs e)
{
SshExec exec = new SshExec("10.0.0.111", "root");
exec.Password = "myPassword";
exec.Connect(22);
MessageBox.Show("SSH Connected");
btnMySQL.PerformClick();
}
private void btnMySQL_Click(object sender, EventArgs e)
{
try
{
sql_connection = new MySqlConnection("server = 10.0.0.111; Port = 3306; Database = bizcards; Uid = root; Pwd = myPassword;");
sql_connection.Open();
MessageBox.Show("Connected!", "Yahoo!", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception exp)
{
MessageBox.Show(String.Format("Error:{0}{1}", Environment.NewLine, exp.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Technology News @ www.JassimRahma.com
|
|
|
|
|
I created a WinForm app in C# using VS 2013 Express.
I added code to create a Global Hot Key on the main form. This works fine. My hot key is Ctrl-T. I can press the hot key and make the main form show and hide.
Then I created a second form (ChecklistForm) and now I want to press ctrl-T and make that form show and hide. I do not need the main form to do this any more. I just used the main form to test my Global Hot Key code.
So I'm having trouble getting the second form to respond to the hot key. When I put a break on the WndProc(), there is no break.
Thanks for any help.
re lang="c#">
public partial class MainForm : Form
{
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(String sClassName, String AppName);
private IntPtr thisWindow;
private GlobalHotKeys hotkey;
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
ChecklistForm frm = new ChecklistForm();
frm.Show();
thisWindow = FindWindow(null, "ChecklistForm");
//thisWindow = FindWindow(null, "MainForm");
hotkey = new GlobalHotKeys(thisWindow);
hotkey.RegisterHotKeys();
}
private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
{
thisWindow = FindWindow(null, "ChecklistForm");
//thisWindow = FindWindow(null, "MainForm");
hotkey = new GlobalHotKeys(thisWindow);
hotkey.UnRegisterHotKeys();
}
protected override void WndProc(ref Message keyPressed)
{
if (keyPressed.Msg == 0x0312)
{
thisWindow = FindWindow(null, "ChecklistForm");
//thisWindow = FindWindow(null, "MainForm");
IntPtr i = keyPressed.WParam; // not being used
ShowChecklist ShowChkList = new ShowChecklist(thisWindow);
ShowChkList.execute();
}
base.WndProc(ref keyPressed);
}
}
class GlobalHotKeys // CLASS FILE *********************
{
public enum fsModifiers
{
Alt = 0x0001,
Control = 0x0002,
Shift = 0x0004,
Window = 0x0008
}
private IntPtr _hWnd;
public GlobalHotKeys(IntPtr hWnd)
{
this._hWnd = hWnd;
}
public void RegisterHotKeys()
{
RegisterHotKey(_hWnd, 1, (uint)fsModifiers.Control, (uint)Keys.T);
}
public void UnRegisterHotKeys()
{
UnregisterHotKey(_hWnd, 1);
}
#region WindowsAPI
[DllImport("user32.dll")]
public static extern IntPtr RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);
[DllImport("user32.dll")]
public static extern IntPtr UnregisterHotKey(IntPtr hWnd, int id);
#endregion
}
class ShowChecklist // CLASS FILE *********************
{
public enum nCmdShow
{
NORMAL = 1,
MIN = 2,
MAX = 3
}
private IntPtr _hWnd;
public ShowChecklist(IntPtr hWnd)
{
_hWnd = hWnd;
}
public void execute()
{
ShowWindowAsync(_hWnd, (int)nCmdShow.NORMAL);
}
#region WindowsAPI
[DllImport("user32.dll")]
private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
#endregion
}
|
|
|
|
|
You should not need set a hotkey for each form anew; if the hotkey is used to open your app quickly, then I'd recommend setting a global hotkey. Easiest way is to assign a shortcut to the app[^] to start it, check if it is running, and if yes, bring the other instance to the front.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I don't want a global hot key to START my forms. I stated: "I do not need the main form to do this any more. I just used the main form to test my Global Hot Key code."
I want to show and hide my second form with a global hot key and my code above isn't working to do that.
Thank you...
|
|
|
|
|
rfresh wrote: <layer>I don't want a global hot key to START my forms. I know; you want to show "a" form from your project when the user presses a specific key.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello everyone
In my WPF project I have created a UserControl (this is called Applic.xaml), and within this usercontrol I have placed another UserControl (this is called PasswordScreen.xaml). Here is the xaml design code:
<UserControl xmlns:my2="clr-namespace:iPosCloud.com.iposcloud.uiC_.views"
x:Class="iPosCloud.com.iposcloud.main.Applic"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:my0="clr-namespace:iPosCloud.com.iposcloud.main"
xmlns:Intersoft="http://intersoft.clientui.com/schemas"
xmlns:my1="clr-namespace:Intersoft.Client.UI.Controls;assembly=Intersoft.Client.UI.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1024" xmlns:my="http://schemas.microsoft.com/surface/2008">
<UserControl.Background>
<ImageBrush ImageSource="/iPosCloud;component/images/HoneyComb.png" Stretch="Fill" TileMode="Tile" Viewport="0,0,46,25" ViewportUnits="Absolute" />
</UserControl.Background>
<UserControl.Resources>
<DropShadowEffect x:Key="DropShadowEffect" ShadowDepth="0.1" Direction="360" BlurRadius="3" Opacity=".5" />
</UserControl.Resources>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="MainGridApplic">
<Border BorderThickness="2" HorizontalAlignment="Left" Name="border1" VerticalAlignment="Stretch" Margin="4" BorderBrush="{x:Null}">
<Border.BitmapEffect>
<DropShadowBitmapEffect Color="Black" Direction="360" ShadowDepth="10" Opacity=".5" Softness="9" />
</Border.BitmapEffect>
<Intersoft:UXGridPanel Margin="2" Column="1" Row="1" ItemHeight="220" ItemWidth="1190" Name="UXGridPanelLeft">
<Image Name="image1" Source="/iPosCloud;component/images/Logo.png" Width="1000" HorizontalAlignment="Left" />
</Intersoft:UXGridPanel>
</Border>
<Grid Margin="2" HorizontalAlignment="Right">
<my2:PasswordScreen /> "HERE IS THE UserControl THAT I PLACED..."
</Grid>
</Grid>
</UserControl>
In PasswordScreen.xaml there is a button (called Login). On click event when clicked I want to call another xmal file called SwitchboardView.xaml but not firing nothing and the code behind this button is:
private void btnLogin_Click(object sender, RoutedEventArgs e)
{
SwitchboardView sbv = new SwitchboardView();
Applic ap = new Applic();
ap.MainGridApplic.Children.Add(sbv);
}
Could someone please help me solve this problem (what am I doing wrong...)
Kind regards
Lapeci
|
|
|
|
|
|
Hi, I have more than one applications. Have to install using single installer. Using Inno or WIX.
Ex:App1 App2 App2 into single installer AllSetup. Please help me.
|
|
|
|
|
|
Thanks Maciej Los, I am trying to do with these.
|
|
|
|
|
In control panel i am able to see only one application and desktop shortcut is also only one, can you please resolve this issues.
|
|
|
|
|
Hi,
I developed an application in C# vs2010, and I need to install it to client System
1stly I installed the dot net framework4.0 on the System and then the application
but it showing an error unable to find a version of the runtime
|
|
|
|
|
Check your app: look at the version of the .NET framework it is targeting.
VS2010 supports up to V4.0, but MSDN does say:
"However, the .NET Framework 4 ends this layering approach, so apps built for 2.0. 3.0, or 3.5 will not work on version 4 or later."
http://msdn.microsoft.com/en-us/library/bb822049(v=vs.110).aspx[^]
So if your app is targeting V3.5 or below, then installing V4.0 of .NET will not allow it to run. Either change the target of you app and rebuild, or install .NET V3.5
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Hi guys am new to visual studio and c# programming stuff, tho have a good background knowledge of C and C++..
how do I go about having my entire source code in c # pasted to the visual studio , to run it from there??.I have a complete source code
|
|
|
|
|
If you have the complete source, then you probably want to open the .SLN file - it's a Visual Studio solution which should load the whole source correctly into Visual Studio ready for you to inspect / compile / run as you need.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
You can not convert C/C++ code to C# without effort even your original C/C++ code was under the .NET framework. You will have to actually rewrite a part of your code...
If it was a Win32 API application you have even more work to do...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|