windows-applications

how to insert data into two tables at a time using entity framework

允我心安 提交于 2019-12-22 00:11:32
问题 i need to insert data which is in windows forms has to insert to two tables. i am using data source for all controls in windows forms. can you please sugest me how to insert data from windows forms into two tables at same time. my table is like this **product table** pid salePrice **Product_tax table** pid taxid When i click on submit button product id will auto generate and salePrice has to store from form at same time what ever i select tax that also has to store in product_tax table along

How to create single file setup in windows application in c#?

£可爱£侵袭症+ 提交于 2019-12-22 00:09:35
问题 I am creating windows application in c# when creating setup project option of single file setup in not available.How to create single file setup in windows application in c#? 回答1: a bit of a curveball but setup files are very 1990's - have you considered using spoon to deliver your app in its own environment with its own dependencies as a single exe. See spoon.net and spoon studio for what you can do but honestly it is a really nice way to distribute an app. ed [Edit] not sure why the

Ubuntu on Windows as VS Code terminal - executable path

左心房为你撑大大i 提交于 2019-12-21 21:39:49
问题 There is a related question but it details the approach for WSL, in newer versions of Windows, the Linux distributions are not beta anymore and they are provided through the MS app store. Where do I find the path to Ubuntu on Windows executable? (Not WSL.) I tried right-clicking on the icon to find Properties, but it is not there, it seems to be some special kind of a shortcut. 回答1: If you have multiple distros installed, you can read this how to launch one individually. https://msdn

Add NewLine to label's Text at design time

隐身守侯 提交于 2019-12-21 06:46:55
问题 How can I add newlines to a Label 's Text at design time? There are some posts on Stack Overflow on how to do this in code-behind, but there is no post about that for design time yet, it seems? 回答1: When you click on the label Text property in the Property window for the label, a drop down will appear in which you can, when you press Enter , go to the new line. I just tried it, and it works in Visual Studio 2010. Here's a screenshot to clarify: 回答2: Design Time \r\n will do the trick - label1

How to fetch data from SAP system using sap .net connector?

瘦欲@ 提交于 2019-12-21 04:58:38
问题 I am developing an windows application, here I wanna extract data from sap system and show it in a datagridview... I have extracted the column names alone like name, city and so on.. I don't know how to extract the data from the columns, can anyone help me with the code? I am using RFC_READ_TABLE function module and rfc destiantion manager Thanks in advance!!! 回答1: untested, but this is essentially how it works: first create the connection RfcDestination destination = mDestinationManager

How to add image icon to title bar and hide bottom bar in Compact Framework.?

你说的曾经没有我的故事 提交于 2019-12-20 07:25:15
问题 1) I want to add an logo(Image) in the Form Header. How do I do that ? 2) In the windows phone a bottom bar appears with the sign of a keyboard. How do I remove this bar as I am using my custom keyboard. ? Title Bar 回答1: The bottom bar can be 'removed' by removing (set to null) the mainmenu of the form. The caption bar (top bar) can not be latered easily, it is shared between all windows on the Windows Mobile device. The screen shot shows a windows mobile screen of windows mobile 6.x before 6

MFC application crashing in ProcessShellCommand() when file to open specified on command line

别来无恙 提交于 2019-12-19 20:39:11
问题 The problem I need to solve is how to use the MFC function ProcessShellCommand() in the InitInstance() of a CWinApp to process a File Open with a specific path when the application to open the file is being launched by another application. I have an MFC MDI (Multiple Document Interface) application that is started by another application with a command line using ShellExecute() containing the path to a file to open. When compiled with Visual Studio 2005, I do not see a problem with the

Text box only allow IP address in windows application

╄→гoц情女王★ 提交于 2019-12-19 11:36:08
问题 I need a textbox that only allows an IP address. I can create this in a web application but i can't do this in windows application. Please help me to do this.. 回答1: Use this method to validate IP public bool IsValidIP(string addr) { //create our match pattern string pattern = @"^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\. ([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$"; //create our Regular Expression object Regex check = new Regex(pattern); //boolean variable to hold the

WMI The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

*爱你&永不变心* 提交于 2019-12-18 16:57:44
问题 My application requirement is like below. Application will run on domain admin system which will ping all machine under that domain, it will take disk drive, CPU and RAM details from all domain systems. Whenever I'm trying to ping machine I'm getting error that "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)" Code I'm using to connect remote machine is ConnectionOptions options = new ConnectionOptions(); options.EnablePrivileges = true; options.Impersonation =

UWP Bluetooth ConnectAsync error to Raspberry Pi. Element not found

守給你的承諾、 提交于 2019-12-14 04:12:09
问题 I'm making a Windows UWP app that uses RFCOMM to communicate to a Raspberry Pi. Both my Windows laptop and Raspberry Pi are already connected and paired (manually). I know the bluetooth address of the Raspberry Pi and the channel it's using and these values are hardcoded into the parameters for ConnectAsync(...). When ConnectAsync(...) is called, the Raspberry Pi does receive a connection and it prints the line "accepted connection from ('Windows bluetooth address', 1). However, the exception